{% extends 'partials/base.html' %}
{% block title %}客户信息{% endblock %}
{% load crispy_forms_tags %}

{% block content %}
<div class="container">
    <div class="row my-4">
        <div class="col-md-4"></div>
        <div class="col-md-8">
            <div class="card">
                <div class="card-header bg-info text-white">
                    客户信息详情
                    <a class="btn btn-success btn-sm float-right" href="{% url 'user-profile-update' %}">编辑</a>
                </div>
                <div class="row p-3">
                    <div class="col-md-8">
                        <table class="table table-borderless">

                            <tbody>
                            <tr>
                                <th scope="row">姓名</th>
                                <td>{{user.username}}</td>
                            </tr>
                            <tr>
                                <th scope="row">邮箱</th>
                                <td>{{user.email}}</td>
                            </tr>
                            <tr>
                                <th scope="row">电话</th>
                                <td>{{user.profile.phone}}</td>
                            </tr>
                            <tr>
                                <th scope="row">地址</th>
                                <td>{{user.profile.address}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="col-md-4">
                        <img class="img-thumbnail" src="{{user.profile.image.url}}" alt="profile-image">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}